package com.castle.fortress.admin.cms.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 导航/属性
 * @author  castle
 */
@Getter
@AllArgsConstructor
public enum ChannelCategoryEnum {

    LIST(1,"列表栏目","列表栏目"),
    COVER(2,"封面栏目","封面栏目"),
    WEBURL(3,"外链栏目","外链栏目"),
    ;

    Integer code;
    String name;
    String desc;

    public static String getNameByCode(Integer code){
        for(ChannelCategoryEnum e: ChannelCategoryEnum.values()){
            if(e.getCode().equals(code)){
                return e.getName();
            }
        }
        return null;
    }
}
